﻿using LJX.SmartPark.Common.Extensions;
using LJX.SmartPark.Common.ResponseOutput;
using LJX.SmartPark.Domain.IotInfo;
using LJX.SmartPark.Domain.SysManage;
using LJX.SmartPark.Service.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJX.SmartPark.Service.SysManage
{
    public class DepartManageService : IDepartManageService
    {
        private readonly IRepository<DepartManage> _studentService;

        public DepartManageService(IRepository<DepartManage> studentService)
        {
            _studentService = studentService;
        }

        public async Task<Response<List<DepartManage>>> GetDepartManageAsync()
        {
            var students = await _studentService.GetAllListAsync();
            var result = students.MapToList<DepartManage>();
            return Response<List<DepartManage>>.Ok(result);
        }
    }
}
